﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>
    <title>卫星地图高清2014,谷歌地图高清卫星地图,最新Google高清卫星地图</title>
    <meta name="Keywords" content="卫星地图高清2014,谷歌地图高清卫星地图,最新Google高清卫星地图">
    <meta name="Description" content="SOS地图提供最新2014年最新高清谷歌卫星地图">
    <meta http-equiv="mobile-agent" content="format=xhtml; url=http://m.sosyes.cn/">
    <link href="/style.css" rel="stylesheet" media="screen" type="text/css" />
    <script type="text/javascript" src="http://ditu.google.cn/maps/api/js?v=3&sensor=false&language=zh-cn"></script>
    <script   type="text/javascript">
        window.onload = function () {
            var geo = new geoEach();
            // 解析地名到经纬度
            var area = document.getElementById('address').value;
            area = area.split('\n');
            var sh;
            var i = 0;
            sh = window.setInterval(function () {
                if (i < area.length) {
                    geo.toLatLng(area[i]);
                } else {
                    window.clearInterval(sh);
                }
                i++;
            }, 500);
        }
 
      
        function geoEach() {
            // 初始化地图
            geoEach.map = new google.maps.Map(document.getElementById("map_canvas"), {
                center: new google.maps.LatLng(35.86166, 104.19539699999996),
                zoom: 4,
                mapTypeId: google.maps.MapTypeId.HYBRID
            });
            // 添加一个marker
            geoEach.marker = new google.maps.Marker({
                map: geoEach.map,
                position: new google.maps.LatLng(35.86166, 104.19539699999996)
            });
            // 实例化Geocoder服务
            geoEach.geocoder = new google.maps.Geocoder();

           


        }
        geoEach.address = null;// 需要解析的地名
        geoEach.prototype = {
            // 解析地名
            toLatLng: function (address) {
                // 接收
                geoEach.address = address;
                // 执行geocode解析地名
                geoEach.geocoder.geocode({
                    // 传入地名
                    'address': geoEach.address
                }, function (results, status) {
                    // create div
                    var newElement = window.document.createElement('p');
                    if (status == google.maps.GeocoderStatus.OK) {
                        // 获取解析后的经纬度
                        var location = results[0].geometry.location;
                        // 切换地图位置
                        geoEach.map.setCenter(location);
                        geoEach.marker.setPosition(location);

                        var latLng = location.toString().substr(1,
                                location.toString().indexOf(')') - 1);
                        // insert innerHTML
                        newElement.innerHTML = geoEach.address + "：" + latLng;
                    } else {
                        // insert error innerHTML
                        newElement.innerHTML = geoEach.address + "：error " + status;
                    }
                });
            }

        }

        function getCookie(name) {


            alert(document.cookie);

            var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");

            if (arr = document.cookie.match(reg))

                return unescape(arr[2]);
            else
                return null;
        }
    </script>
</head>
<body>
    <div class="wrap" align="center">
       <button onclick="        geoEach.map.panTo(new google.maps.LatLng(43.988870, 125.0501191)); ">平移</button>
        <button onclick="        geoEach.map.setZoom(16)">16级</button><button onclick="    alert(getCookie('NID'))">16级</button>
        <table width="985" border="0">
            <tr>
                <td style="BORDER: #ccd3d9 1px solid">
                    <div id="frame">
                        <div id="searchform">
                            <input id="address" type="hidden" value="中国" />
                        </div>
                        <div id="map_canvas" style="width: 808; height: 600px"></div>

                    </div>
                </td>
                <td width="1"></td>
                 
            </tr>
        </table><br />
        <div style="clear:both;"></div>
        <div class="main"></div>
        <hr width="985" style="height:1px;border:none;border-top:1px dashed #0066CC" />
        <div style="text-align:center">Copyright © 2007-2014 www.sosyes.cn <a href="http://www.sosyes.cn">卫星地图高清2014</a> SOS地图版权所有  <span style="display:none">
        <script src="/js/count.js" type="text/javascript"></script></span></div>
    </div>
</body>
</html>